#!/bin/sh
# - all
# - localalloc
# - interleave
# - membind
# - cpunodebind
# - preferred
# - physcpubind

opts=
[ "${all-null}" != null ] && opts="${opts} --all"
[ "${localalloc-null}" != null ] && opts="${opts} --localalloc"
[ -n "$interleave"	] && opts="${opts} --interleave=$interleave"
[ -n "$membind"		] && opts="${opts} --membind=$membind"
[ -n "$cpunodebind"	] && opts="${opts} --cpunodebind=$cpunodebind"
[ -n "$preferred"	] && opts="${opts} --preferred=$preferred"
[ -n "$physcpubind"	] && opts="${opts} --physcpubind=$physcpubind"

cat >> $TMP/env.yaml <<EOF

# setup/numactl
exec_prefix: /usr/bin/numactl $opts --
EOF
